package com.cv.platform.controller.platform.comment;

import com.cv.framework.common.pojo.Result;
import com.cv.platform.service.comment.CvCommentReplyLikeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 视频平台 - 视频回复评论点赞控制层
 *
 * @author Charles_XDXD
 */
@Tag(name = "视频平台 - 视频回复评论点赞控制层")
@RestController
@RequestMapping("/platform/video/comment/reply/like")
public class CvCommentReplyLikeController {

    @Resource
    private CvCommentReplyLikeService cvCommentReplyLikeService;

    @PostMapping("save")
    @Operation(summary = "保存点赞视频回复评论")
    public Result<Void> saveCommentLike(Long commentId) {
        cvCommentReplyLikeService.saveCommentReplyLike(commentId);
        return Result.success();
    }

    @DeleteMapping("cancel")
    @Operation(summary = "取消点赞视频回复评论")
    public Result<Void> cancelCommentLike(Long commentId) {
        cvCommentReplyLikeService.cancelCommentReplyLike(commentId);
        return Result.success();
    }

}
